﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="ViewStudent.aspx.cs" Inherits="Student_Portal.ViewStudent" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="display">
    <asp:GridView ID="grdDisplay" runat="server" AutoGenerateColumns="False" Width="500px"
        ForeColor="#333333" GridLines="None" 
            EmptyDataText="No Records to Display" 
            onrowdatabound="grdDisplay_RowDataBound" 
            onselectedindexchanging="grdDisplay_SelectedIndexChanging" >
        <AlternatingRowStyle BackColor="#CCCCCC" ForeColor="#284775" />
        <Columns>
            <asp:CommandField ShowSelectButton="True" >
            <ControlStyle ForeColor="Maroon" />
            </asp:CommandField>
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:HiddenField ID="hdnId" runat="server"  Value='<%#Eval("Id") %>'/>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="Name" HeaderText="Student Name" />
            <asp:TemplateField HeaderText="Class">
                <ItemTemplate>
                    <asp:Label ID="lblClass" runat="server" Text='<%#Eval("Class") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="Rollno" HeaderText="Roll No" />
        </Columns>
        <EditRowStyle BackColor="#999999" />
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="Maroon" Font-Bold="True" ForeColor="White" 
            Font-Size="Large" HorizontalAlign="Left" />
       <RowStyle BackColor="#999999" ForeColor="#333333"  Wrap="False" />
       
        
    </asp:GridView>
</div>
<div class="updatepanel">
    <asp:MultiView ID="MultiView1" runat="server" 
        onactiveviewchanged="MultiView1_ActiveViewChanged">
        <asp:View ID="ViewmodeView" runat="server">
            <h1>View Student Details</h1>
            <div >
                <div >
                    <div class="cell1">
                    <asp:GridView ID="grdImage" runat="server" AutoGenerateColumns="False" 
                            onrowdatabound="grdImage_RowDataBound" ShowHeader="False">
                        <Columns>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:Label Visible="false"  ID="lblPhto" Text='<%#Eval("Image") %>' runat="server"></asp:Label>
                                    <asp:Image ID="imgPjhoto" runat="server" Height="100" Width="100" />
                                </ItemTemplate>
                            </asp:TemplateField>
                              
                        </Columns>
                    </asp:GridView>
                    
                    </div><br /><br />
                    <div>
                        <asp:GridView ID="GrdView" runat="server" AutoGenerateColumns="False" Width="500px"
                            ForeColor="#333333" GridLines="None" 
                            onrowdatabound="GrdView_RowDataBound1" onrowediting="GrdView_RowEditing" 
                            onrowupdating="GrdView_RowUpdating">
                                
                            <AlternatingRowStyle BackColor="#CCCCCC" ForeColor="#284775" />
                            <Columns>
                                <asp:BoundField DataField="Name" HeaderText="Student Name" />
                                <asp:TemplateField HeaderText="Class">
                                    <ItemTemplate>
                                        <asp:Label ID="lblClass1" runat="server" Text='<%#Eval("Class") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="Rollno" HeaderText="Roll No" />
                                <asp:CommandField ButtonType="Button" ShowEditButton="True">
                                <ControlStyle BackColor="Maroon" ForeColor="White" />
                                </asp:CommandField>
                                <asp:CommandField ButtonType="Button" ShowDeleteButton="True">
                                <ControlStyle BackColor="Maroon" ForeColor="White" />
                                </asp:CommandField>
                            </Columns>
                            <EditRowStyle BackColor="#999999" />
                            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                            <HeaderStyle BackColor="Maroon" Font-Bold="True" ForeColor="White" 
                                Font-Size="Large" HorizontalAlign="Left" />
                           <RowStyle BackColor="#999999" ForeColor="#333333"  Wrap="False" />   
                        </asp:GridView>
                    </div>
                </div>
           </div>
        </asp:View>
        <asp:View ID="EditmodeView" runat="server">
         </asp:View>
    </asp:MultiView>
</div>
</asp:Content>
